package com.example2016.cjj.wxplangamedemo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);


        Button btnview = (Button) findViewById(R.id.btn_view);
        btnview.setOnClickListener(this);

        Button btnsurfaceview = (Button) findViewById(R.id.btn_surfaceview);
        btnsurfaceview.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_view:
                Intent intent1 = new Intent(this, GameViewActivity.class);
                startActivity(intent1);
                break;
            case R.id.btn_surfaceview:
                Intent intent2 = new Intent(this, GameSurfaceViewActivity.class);
                startActivity(intent2);
                break;
        }
    }
}
